% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/table_x100.R
\name{table_x100}
\alias{table_x100}
\alias{fix_pctcols_x100}
\title{utility to multiply certain percentage columns by 100 to convert 0-1.00 into 0-100}
\usage{
table_x100(df, cnames = names_pct_as_fraction_ejamit)
}
\arguments{
\item{df}{data.frame but can be data.table}

\item{cnames}{colnames in df of indicators to multiply by 100, like those in

names_pct_as_fraction_ejamit,

names_pct_as_fraction_blockgroupstats, or

names_pct_as_fraction_ejscreenit}
}
\value{
df with data in specified columns multiplied by 100
}
\description{
multiplies some data to rescale percentages stored as 0 to 1, into 0-100
}
\examples{
out <- testoutput_ejamit_10pts_1miles
mytable <- out$results_bysite[1:2, ..names_these]
table_signif_round_x100(mytable)
# same as this:
table_signif(
  table_round(
    table_x100(
      mytable, names_pct_as_fraction_ejamit
    )
  )
)

 y = data.frame(pctlowinc = 1:2, pctpre1960 = 1:2, avg.pctunemployed = 1:2, avg.pctpre1960 = 1:2)
 
 table_x100(y, names_pct_as_fraction_ejscreenit)
 table_x100(y, names_pct_as_fraction_blockgroupstats)
 table_x100(y, names_pct_as_fraction_ejamit)
 cat("\n\n")
 names_pct_as_fraction_ejscreenit
 names_pct_as_fraction_blockgroupstats
 names_pct_as_fraction_ejamit
 cat("\n\n")
 ytable = data.table(pctlowinc = 1:2, pctpre1960 = 1:2, avg.pctunemployed = 1:2, avg.pctpre1960 = 1:2)
 
 table_x100(ytable, names_pct_as_fraction_blockgroupstats) 
 table_x100(ytable, names_pct_as_fraction_ejamit)
 cat("\n\n")
 y
 ytable
 
}
\seealso{
\code{\link[=table_signif_round_x100]{table_signif_round_x100()}} \code{\link[=table_signif]{table_signif()}} \code{\link[=table_round]{table_round()}} \code{\link[=table_x100]{table_x100()}}
}
\keyword{internal}
